/*eslint-disable */
import commonStore from '@common/store';
const contextFiles = require.context('./modules', false, /.+\.js$/);

let storeModules = commonStore;
// 批量注册全局组件
contextFiles.keys().forEach(fileName => {
	// 获取函数
	const storeConfig = contextFiles(fileName);
	// 获取名称
	const storeName = fileName
		.replace(/^\.\//, '') // 去除开头的'./'
		.replace(/\.\w+$/, ''); // 去除文件扩展名
	storeModules[storeName] = storeConfig.default;
})

export default storeModules;
